<template>
  <section class="chart-container">
    <div class="c_header">
      <div class="select_top">
        <span class="w_tip">
          <p>填报频率要求：每{{timeType}}</p>
          <!-- <p>本月填报期限 2018-11-20</p> -->
        </span>
        <el-select v-model="value" placeholder="年度">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          >
          </el-option>
        </el-select>
        <el-button>检索</el-button>{{typeId}}
      </div>
      <el-table
        :data="tableData"
        style="width: 92%;font-size:13px;margin:0 auto"
      >
        <el-table-column
          prop="name"
          label="序号"
        >
        </el-table-column>
        <el-table-column
          prop="name"
          label="年度"
        >
        </el-table-column>
        <el-table-column
          prop="name"
          label="填报时间"
        >
        </el-table-column>
        <el-table-column
          prop="name"
          label="状态"
        >
        </el-table-column>
        <el-table-column
          label="操作"
          width="100"
        >
          <template slot-scope="scope">
            <el-button
              type="primary"
              size="small"
              @click="showI=true"
            >
              查看
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-dialog
        title="本月填报期限：2018-11-03"
        :visible.sync="showI"
        width="80%"
      >
        <el-table
          ref="filterTable"
          :data="tableData"
        >

          <el-table-column
            prop="name"
            label="序号"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="评议对象"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="牵头项目"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="协调推进(25分)"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="督查指导(25分)"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="参与协同(25分)"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="任务完成(25分)"
          >
          </el-table-column>
          <el-table-column
            prop="name"
            label="问题及建议"
          >
          </el-table-column>
        </el-table>

      </el-dialog>
    </div>
  </section>
</template>

<script>
export default {
  data() {
    return {
      showI: false,
      ts: this.newStore(),
      testList: [],
      aorgid: 'j30bdt6dh6tk76swwdz2',
    };
  },
  props: {
    typeId: String,
    timeType: String,
    required: true,
  },
  created() {
    this.gettestList();
  },
  methods: {
    gettestList() {
      const a = `${new Date().getFullYear()}`;
      const req = {
        type: '2',
        handle: '04A3682CDCA57EBA0DA6C15FB2ECC84BDA12E083D738952BC15B67093C8E6FE5',
        aorgid: 'j30bdt6dh6tk76swwdz2',
        borgid: '',
        propertyid: this.typeId,
        year: a,
        date: '',
        status: '',
      };
      this.spost(this.ts, '/mainservlet', req).then((ts) => {
        this.testList = ts.d.data.operation1;
      });
    },
  },
};
</script>

<style lang="stylus" scoped>
.chart-container
  min-height 100vh
  background #fff
  width: 100%;
  float: left;
.w_tip
  width 200px
  line-height 27px
  float left
.el-breadcrumb
  height 60px
  line-height 60px
.select_top
  width 92%
  margin 20px auto
</style>
